package org.example.plugins;

public class OperatorHolder {
    private static final ThreadLocal<String> operatorThreadLocal = new ThreadLocal<>();

    //调用此方法在SpringSecurity中设置当前登录的用户信息
    public static void setTableExt(String tableExt) {
        operatorThreadLocal.set(tableExt);
    }

    public static String getTableExt() {
        return operatorThreadLocal.get();
    }

    public static void clearOperator() {
        operatorThreadLocal.remove();
    }
}
